package com.power.sifa.net.service;

import com.plf.common.exception.BusinessException;
import com.power.sifa.net.model.EqproFormTreeNode;
import com.power.sifa.net.model.GeneralBuild;
import com.power.sifa.net.model.SiteTreeBuild;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

public interface Apl_formService {

    /**
     * 保存树节点
     * @param treeNode 保存树节点
     * @return
     */
    void saveFormTreeData(EqproFormTreeNode treeNode) throws Exception;

    /**
     * 删除树节点
     * @param table 删除表名
     * @param id 节点id
     * @return
     */
    void delFormTreeData(Integer sign, String table, String id);

    /**
     * 根据类名获取下拉树
     */
    List<Map<String, Object>> getSelectTree(String clsname, Map<String, Object> filter) throws Exception;


    /**
     * 根据配置对象, 构建生产场地树
     * @param terrBuild
     * @return
     */
    List<Map<String, Object>> buildSiteTree(String applyid, SiteTreeBuild terrBuild) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 获取通用树组件数据
     * @param applyid
     * @param generalBuild
     * @return
     */
    List<Map<String, Object>> getGeneralTree(String applyid, GeneralBuild generalBuild) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException;

    /**
     * 删除通用树节点
     * @param id
     * @param apltable
     * @param enttable
     */
    Map delGeneralNode(String applyid, String id, String apltable, String enttable) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, BusinessException;

    /**
     * 保存通用树节点
     * @param apltable
     * @param enttable
     */
    Map saveGeneralNode(String apltable, String enttable, Map body) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 根据cornumber查询树
     *
     */
    List<Map<String, Object>> getEqTree(String cornumber, SiteTreeBuild terrBuild) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    /**
     * 根据id查询标准信息std的值
     * @param table
     * @param ids
     * @return
     */
    List<Map<String, Object>> queryStdByIds(String table,  String ids);

}
